Skip to content

Conversation

kirangodishala
Copy link
Contributor

This PR is to address spinnaker/spinnaker#7015

With retrofit2 being stricter in many ways, API call is failing when the path param contains ?.

Docker registry APIs (tags and catalog) returns paginated responses with next link being sent in the response header. Since the link includes the query parameters but retrofit2 not aware of it replaces ? with %3F causing 400 Not Found error.

The fix includes parsing the link further to extract the query parameters and send them in the request.

Added tests to demonstrate the issue and to use the real docker registry apis using retrofit2 client.

…r registry apis can be accessed using retrofit2 client and another to demonstrate the issue of retrofit2 replacing `?` with `%3F` causing api failure with 400
@kirangodishala kirangodishala requested a review from dbyron-sf March 6, 2025 21:17
…fit2 replacing `?` with `%3F` causing api failure with 400
@dbyron-sf dbyron-sf added the ready to merge Approved and ready for a merge label Mar 7, 2025
@mergify mergify bot added the auto merged Merged automatically by a bot label Mar 7, 2025
@mergify mergify bot merged commit 0210189 into spinnaker:master Mar 7, 2025
24 checks passed
@dbyron-sf
Copy link
Contributor

@Mergifyio backport release-1.37.x

Copy link
Contributor

mergify bot commented Mar 7, 2025

backport release-1.37.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Mar 7, 2025
…`%3F` causing api failure (#6354)

* test(docker): add two test classes, one to demonstrate how real docker registry apis can be accessed using retrofit2 client and another to demonstrate the issue of retrofit2 replacing `?` with `%3F` causing api failure with 400

* fix(docker): fix the issue of retrofit2 replacing `?` with `%3F` causing api failure with 400

* fix(docker): address review comments on the fix to the issue of retrofit2 replacing `?` with `%3F` causing api failure with 400

(cherry picked from commit 0210189)
mergify bot added a commit that referenced this pull request Mar 7, 2025
…`%3F` causing api failure (#6354) (#6355)

* test(docker): add two test classes, one to demonstrate how real docker registry apis can be accessed using retrofit2 client and another to demonstrate the issue of retrofit2 replacing `?` with `%3F` causing api failure with 400

* fix(docker): fix the issue of retrofit2 replacing `?` with `%3F` causing api failure with 400

* fix(docker): address review comments on the fix to the issue of retrofit2 replacing `?` with `%3F` causing api failure with 400

(cherry picked from commit 0210189)

Co-authored-by: Kiran Godishala <53332225+kirangodishala@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto merged Merged automatically by a bot ready to merge Approved and ready for a merge target-release/1.38
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants